﻿using CatLib.Container;
using GameFramework.Gameplay;
using GameLogic.ShootGame.Model;

namespace GameLogic.ShootGame.System
{
    /// <summary>
    /// 射击游戏开火系统
    /// </summary>
    public sealed class ShootGameFireSystem : IShootGameFireSystem
    {
        [Inject]
        public ShootGameStateModel StateModel { get; set; }
        
        public void Initialize()
        {
        }

        public void Dispose()
        {
        }

        public void Fire()
        {
            if (StateModel.RemainBulletCount.Value <= 0)
                return;
            
            --StateModel.RemainBulletCount.Value;
            ++StateModel.Score.Value;
        }
    }
}